package es.ats.codington.festival.mappers;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;


import es.ats.codington.festival.domain.Place.Zone;

import es.ats.codington.festival.domain.TouristAttraction;



public class TouristAttractionMapper implements RowMapper<TouristAttraction>{

	@Override
	public TouristAttraction mapRow(ResultSet resultSet, int numRow) throws SQLException {
		TouristAttraction touristAttraction = new TouristAttraction();
		

		touristAttraction.setIdPlace(resultSet.getInt("idPlace"));
		touristAttraction.setPlaceName(resultSet.getString("placeName"));
		touristAttraction.setZone(Zone.SOUTH);
		touristAttraction.setAttractionName(resultSet.getString("AttractionName"));
			
			
		return touristAttraction;
	}

}
